<template>
  <div class="app-container">
  <el-card class="box-card">
      <el-form ref="form" :model="form" >


            <el-descriptions  title="基本信息"  :column="4" border >
              <el-descriptions-item label="保卫类别" :span="1" label-class-name="my-label" :labelStyle="labelStyle" >
                <dict-tag :options="dict.type.yh_security_type" :value="form.securityType"/>
              </el-descriptions-item>
              <el-descriptions-item label="保卫项目"  :span="3" label-class-name="my-label" :labelStyle="labelStyle" >{{ form.securityProject}}</el-descriptions-item>

              <el-descriptions-item label="责任人" :span="1" label-class-name="my-label" :labelStyle="labelStyle">{{ form.presonLiable}}</el-descriptions-item>
              <el-descriptions-item label="军事代表室" :span="1" label-class-name="my-label" :labelStyle="labelStyle">{{ form.dept.deptName}}</el-descriptions-item>
            </el-descriptions>
        <br>
              <el-descriptions  title="化解信息"  :column="1" border >
                <el-descriptions-item label="化解时限" :span="2" label-class-name="my-label" :labelStyle="labelStyle">{{ form.timeLimit}}</el-descriptions-item>
                <el-descriptions-item label="具体问题隐患" :span="1" label-class-name="my-label" :labelStyle="labelStyle">
                  {{ form.hiddenDangers }}
                </el-descriptions-item>
                <el-descriptions-item label="稳控化解措施" :span="3" label-class-name="my-label" :labelStyle="labelStyle">{{ form.resolutionMeasures}}</el-descriptions-item>
            <el-descriptions-item label="备注" :span="1" label-class-name="my-label" :labelStyle="labelStyle">{{ form.remark}}</el-descriptions-item>

            </el-descriptions>


</el-form>



    <br>


      <div style="float:right; margin-bottom: 15px;">
<br>

        <el-button @click="viewCancel">返 回</el-button>
      </div>
  </el-card>
  </div>
</template>
<!--<style>-->
<!--  .img-box1 {-->
<!--    white-space: pre-wrap;-->
<!--    width: 90%;-->

<!--    position: center;-->
<!--    margin:20px auto;-->
<!--  }-->
<!--  .img-box1 img {-->
<!--    width: 70%;-->

<!--    position: relative;-->
<!--    left: 50%;-->
<!--    transform: translateX(-50%);-->
<!--  }-->
<!--  .imgpre{-->
<!--    width:200px;-->
<!--    height: 100px;-->


<!--  }-->
<!--  .ifr{-->
<!--    width: 70%;-->
<!--    height: 700px;-->

<!--    position: relative;-->
<!--    left: 50%;-->
<!--    transform: translateX(-50% );-->
<!--  }-->


<!--  /*.input_textarea input.el-textarea__inner {*/-->
<!--  /*  border: none;*/-->
<!--  /*}*/-->
<!--  /*.input_textarea>>>.el-textarea__inner{*/-->
<!--  /*  border: 0;*/-->
<!--  /*  resize: none;*/-->
<!--  /*}*/-->



<!--</style>-->
<script>


  import { listSecuritywork, getSecuritywork, delSecuritywork, addSecuritywork, updateSecuritywork } from "@/api/module/lys/security/security";
  import { getToken } from "@/utils/auth";
  import { treeselect } from "@/api/system/dept";

  import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  import watermark from "watermark-dom";


  import {addStatisticsp,updateStatistics,upStatistics1 } from "@/api/module/yzx/cs/statistics";
  import Treeselect from "@riophae/vue-treeselect";


  export default {
    name: "Securitywork",
    dicts:['yh_representative_office','yh_security_type'],
    components: { Treeselect },


    data() {
      return {
        option_nation: [
        ],
        //部门树选项
        deptOptions:undefined,
        labelStyle: { 'width': '200px','color': '#000000','text-align': 'right', }                                              ,
        form:{
          id: null,
          securityType: null,
          securityProject: null,
          hiddenDangers: null,
          resolutionMeasures: null,
          presonLiable: null,
          timeLimit: null,
          deptId: null,
          createBy: null,
          createTime: null,
          updateBy: null,
          updateTime: null,
          remark: null,
          note1: null,
          note2: null,
          note3: null,
          note4: null,
          note5: null,
          note6: null,
          note7: null,
          note8: null,
          note9: null,
          note10: null
        },
        // 选中选项卡的 name
        //activeName: "columnInfo",
        // 表格的高度
        // tableHeight: document.documentElement.scrollHeight - 245 + "px",
        // 表信息
        tables: [],
        // 表列信息
        columns: [],
        // 字典信息
        dictOptions: [],
        // 菜单信息
        menus: [],
        // 表详细信息
        info: {note1:"",
          note2:""},
      // 查询参数
      queryParams: {
        pageNum: 1,
          pageSize: 10,
          title: undefined,
          operName: undefined,
          businessType: undefined,
          status: undefined
      }
      };
    },
    created() {

      const id = this.$route.query.id;
      if (id) {
        // 获取表详细信息

        getSecuritywork(id).then(res => {

          this.form = res.data;

        });

      }

      this.getTreeselect();
    },

    methods: {


      /** 关闭按钮 */
      viewCancel() {
        const id = this.$route.query.id;
        getSecuritywork(id).then(response => {
          this.form = response.data;

        });
        const obj = { path: "/dangzheng/lyssecurity", query: {id} };
        this.$tab.closeOpenPage(obj);
      },



      getTreeselect() {
        treeselect().then(response => {
          this.deptOptions = response.data;
          console.log(response.data)
        });
      },
    },

  };
</script>
<style lang="scss" scoped>



</style>





